﻿
@(Html.Telerik().TreeView().Name("fields").DragAndDrop(settings => settings.DropTargets(".ws-fields"))
        .ClientEvents(events => events.OnNodeDrop("onFieldDrop"))
        .Items(item =>
        {
            item.Add().Text("表单字段").ImageUrl("~/images/127.png")
            .ImageHtmlAttributes(new { alt = "organization Icon", @class = "process_designtoolbox_treeview_title_img" })
            .Items(subitem =>
            {
                subitem.Add().Text("文本编辑框").HtmlAttributes(new {controltype="text"});
                subitem.Add().Text("数字编辑框").HtmlAttributes(new { controltype = "number" });
                subitem.Add().Text("富文本编辑框").HtmlAttributes(new { controltype = "richtext" });
                subitem.Add().Text("单选框").HtmlAttributes(new { controltype = "singleselection" });
                subitem.Add().Text("多选框").HtmlAttributes(new { controltype = "multipleselection" });
                subitem.Add().Text("下拉框").HtmlAttributes(new { controltype = "dropdownlist" });
                subitem.Add().Text("超链接").HtmlAttributes(new { controltype = "hyperlink" });
                subitem.Add().Text("滑动控件").HtmlAttributes(new { controltype = "slider" });
                subitem.Add().Text("找人控件").HtmlAttributes(new { controltype = "peoplefinder" });
                subitem.Add().Text("日期控件").HtmlAttributes(new { controltype = "datepicker" });
            });
        })
)

@(Html.Telerik().TreeView().Name("conditions").DragAndDrop(settings => settings.DropTargets(".ws-conditions"))
            .ClientEvents(events => events.OnNodeDrop("onConditionDropped"))
        .Items(item =>
        {
            item.Add().Text("条件").ImageUrl("~/images/127.png")
            .ImageHtmlAttributes(new { alt = "organization Icon", @class = "process_designtoolbox_treeview_title_img" })
            .Items(subitem =>
            {
                subitem.Add().Text("文字类型").HtmlAttributes(new { conditiontype = "text" });
                subitem.Add().Text("数字类型").HtmlAttributes(new { conditiontype = "number" });
                subitem.Add().Text("金额类型").HtmlAttributes(new { conditiontype = "currency" });
                subitem.Add().Text("日期类型").HtmlAttributes(new { conditiontype = "time" });
                
                
                
            });
        })
)

@(Html.Telerik().TreeView().Name("others").DragAndDrop(settings => settings.DropTargets(".ws-queues, .ws-containers"))
          .ClientEvents(events => events.OnNodeDrop("onOthersDrop"))
          .Items(item =>
          {
              item.Add().Text("其他").ImageUrl("~/images/127.png")
                       .ImageHtmlAttributes(new { alt = "organization Icon", @class = "process_designtoolbox_treeview_title_img" })
                       .Items(subItem =>
                       {
                           subItem.Add().Text("队列").HtmlAttributes(new {@class="dt-queue" })
                                   .ImageUrl("~/images/44.png")
                                   .ImageHtmlAttributes(new { alt = "organization Icon", @class = "process_designtoolbox_treeview_title_img" });
                           subItem.Add().Text("环节容器").HtmlAttributes(new { @class = "dt-container" })
                                   .ImageUrl("~/images/44.png")
                                   .ImageHtmlAttributes(new { alt = "organization Icon", @class = "process_designtoolbox_treeview_title_img" });
                       }
                     );
          })
)
@(Html.Telerik().TreeView().Name("activities").DragAndDrop(settings => settings.DropTargets(".ws-activities"))
          .ClientEvents(events => events.OnNodeDrop("onActivityDrop"))
      .Items(item =>
      {
          item.Add()
              .Text("结构").ImageUrl("~/images/106.png")
               .ImageHtmlAttributes(new { alt = "organization Icon", @class = "process_designtoolbox_treeview_title_img" })
              .Items(subItem =>
              {
                  subItem.Add()
                         .Text("公司")
                         .ImageUrl("~/images/120.png")
                         .ImageHtmlAttributes(new { alt = "Company Icon", @class = "process_designtoolbox_treeview_title_img" });
                  subItem.Add()
                         .Text("部门")
                         .ImageUrl("~/images/123.png")
                         .ImageHtmlAttributes(new { alt = "Department Icon", @class = "process_designtoolbox_treeview_title_img" })
                         .Items(si =>
                         {
                             si.Add()
                               .Text("行政部")
                               .ImageUrl("~/images/122.png")
                               .ImageHtmlAttributes(new { alt = "Personal Folders Icon", @class = "process_designtoolbox_treeview_title_img" });
                             si.Add()
                               .Text("人力资源部")
                               .ImageUrl("~/images/54.png")
                               .ImageHtmlAttributes(new { alt = "Personal Folders Icon", @class = "process_designtoolbox_treeview_title_img" });
                             si.Add()
                               .Text("IT部")
                               .ImageUrl("~/images/21.png")
                               .ImageHtmlAttributes(new { alt = "Personal Folders Icon", @class = "process_designtoolbox_treeview_title_img" });
                             si.Add()
                               .Text("财务部")
                               .ImageUrl("~/images/80.png")
                               .ImageHtmlAttributes(new { alt = "Personal Folders Icon", @class = "process_designtoolbox_treeview_title_img" });
                         });
                  subItem.Add()
                         .Text("团队")
                         .ImageUrl("~/images/33.png")
                         .ImageHtmlAttributes(new { alt = "Inbox Icon", @class = "process_designtoolbox_treeview_title_img" }).Items(si =>
                         {
                             si.Add()
                               .Text("A队")
                               .ImageUrl("~/images/85.png")
                               .ImageHtmlAttributes(new { alt = "Personal Folders Icon", @class = "process_designtoolbox_treeview_title_img" });
                             si.Add()
                               .Text("B队")
                               .ImageUrl("~/images/85.png")
                               .ImageHtmlAttributes(new { alt = "Personal Folders Icon", @class = "process_designtoolbox_treeview_title_img" });
                             si.Add()
                               .Text("C队")
                               .ImageUrl("~/images/85.png")
                               .ImageHtmlAttributes(new { alt = "Personal Folders Icon", @class = "process_designtoolbox_treeview_title_img" });
                         });
                  subItem.Add()
                       .Text("个人")
                       .ImageUrl("~/images/33.png")
                       .ImageHtmlAttributes(new { alt = "Inbox Icon", @class = "process_designtoolbox_treeview_title_img" }).Items(si =>
                       {
                           si.Add().HtmlAttributes(new {activitytype="single"})
                             .Text("单人")
                             .ImageUrl("~/images/47.png")
                             .ImageHtmlAttributes(new { alt = "Personal Folders Icon", @class = "process_designtoolbox_treeview_title_img" });
                           si.Add().HtmlAttributes(new { activitytype = "upperlevels" })
                             .Text("汇报上级：1~N")
                             .ImageUrl("~/images/47.png")
                             .ImageHtmlAttributes(new { alt = "Personal Folders Icon", @class = "process_designtoolbox_treeview_title_img" });
                           });
              });
      })
)
